/*

*/
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [
  {
    path: '/capitalsettle',
    meta: { title: '资金结算', icon: 'el-icon-s-flag' },
    redirect: '/capitalsettle',
    component: RouteView,
    children: [
      {
        path: '/capitalsettle/saleSettlement',
        meta: { title: '整车结算' },
        redirect: '/capitalsettle/saleSettlement',
        component: RouteView,
        children: [
          {
            path: '/capitalsettle/saleSettlement/ordermanage/index',
            meta: { title: '开票登记', keepAlive: true },
            component: AsyncComponent('capitalsettle/saleSettlement/ordermanage/index')
          }
        ]
      },
      {
        path: '/capitalsettle/vehicle',
        meta: { title: '整车结算' },
        redirect: '/capitalsettle/saleSettlement',
        component: RouteView,
        children: [
          {
            path: '/capitalsettle/vehicle/settlecollection/searchSettleCollection',
            meta: { title: '整车订单收款', keepAlive: true },
            component: AsyncComponent('capitalsettle/vehicle/settlecollection/index')
          }
        ]
      }
    ]
  }
];

export default menuRoutes;
